<template>
       <tit title="列表"></tit>
    <div v-for="item in lb">
        <router-link :to="{ name: 'xq', params: { goods_id: item.goods_id } }">

            <van-card :price="item.goods_price" :title="item.goods_name"
                :thumb="goods_small_logo ? goods_small_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'" />
        </router-link>

    </div>
</template>

<script setup>
import { searchApi } from '@/api/api';
import { ref } from 'vue';
import { useRoute } from 'vue-router';
let route=useRoute()
let lb = ref([]);
searchApi(route.params.query).then(res => {
    console.log('列表', res);
    lb.value = res.data.message.goods;
})
import tit from '@/components/tit.vue';
</script>

<style lang="scss" scoped></style>